@RestController
@RequestMapping("/user/login")
@CrossOrigin(origins = "http://localhost:8081", allowCredentials = "true")
public class LoginController {

    @PostMapping("/login")
    public ResponseEntity<?> handleLogin(@RequestBody LoginRequest request) {
        // 登录逻辑...
        if (success) {
            return ResponseEntity.ok(new LoginResponse("success", jwtToken));
        } else {
            return ResponseEntity.status(401).body("登录失败");
        }
    }
}